import axios from "axios";

const setProjectStatusById = async (projectId : number, status:number | null)=>{
    let url = "/api/project";

    return new Promise(((resolve, reject) => {
        if (status == null){
            url += "/splitToTask";
            const adminId = sessionStorage.getItem("user.id");
            axios.get(url,{
                params: {
                    projectId,
                    adminId
                }
            }).then((response)=>{
                resolve = response.data;
            })
        }


    }))

}

export default setProjectStatusById;







